#this is the DSLR Factory spike project

#it will create a DSLR object based off of user input

import CanonDslrList

#this object will return a DSLR object based off of user input

def createDslr(cameraRequest, mfr):

    mfr.lower()#set mfr to all lower case letters to help avoid any errors

#if the DSLR was manufactured by Canon then see if the factory can create it

    if mfr == "canon":

       #go though all of the sup classes of canon DSLR and find one and return it if it is there

       # if the camera request is for a Canon EOS 5D Mark II then return one

       if cameraRequest == "Canon EOS 5D Mark II": return CanonDslrList.CanonEos5dMarkII()

       # if the camera request is for a Canon Rebel T1i then return one

       elif cameraRequest == "Canon Rebel T1i": return CanonDslrList.CanonRebelT1i()

       # if the camera request is for a Canon EOS-1D X then return one

       elif cameraRequest == "Canon EOS-1D X": return  CanonDslrList.CanonEos1DX()

       # if the camera request is for a Canon EOS 5D Mark III then return one

       elif cameraRequest == "Canon EOS 5D Mark III": return  CanonDslrList.CanonEos5DMarkIII()

       # if the camera request is for a Canon EOS 6D then return one

       elif cameraRequest == "Canon EOS 6D": return  CanonDslrList.CanonEos60D()

       # if the camera request is for a Canon EOS 7D then return one

       elif cameraRequest == "Canon EOS 7D": return  CanonDslrList.CanonEos7D()

       # if the camera request is for a Canon EOS 60D then return one

       elif cameraRequest == "Canon EOS 60D": return  CanonDslrList.CanonEos60D()

        # if the camera request is for a Canon EOS 60Da then return one

       elif cameraRequest == "Canon EOS 60Da": return  CanonDslrList.CanonEos60Da()

       # if the camera request is for a Canon EOS 100D then return one

       elif cameraRequest == "Canon EOS 100D": return  CanonDslrList.CanonEos100D()

       # if the camera request is for a Canon EOS Rebel SL1 then return one

       elif cameraRequest == "Canon EOS Rebel SL1": return  CanonDslrList.CanonEosRebelSL1()

       # if the camera request is for a Canon EOS Kiss X7 then return one

       elif cameraRequest == "Canon EOS Kiss X7": return  CanonDslrList.CanonEosKissX7()

       # if the camera request is for a Canon EOS 700D then return one

       elif cameraRequest == "Canon EOS 700D": return  CanonDslrList.CanonEos700D()

        # if the camera request is for a Canon EOS Rebel T5i then return one

       elif cameraRequest == "Canon EOS Rebel T5i": return  CanonDslrList.CanonEosRebelT5i()

        # if the camera request is for a Canon EOS Kiss X7i then return one

       elif cameraRequest == "Canon EOS Kiss X7i": return  CanonDslrList.CanonEosKissX7i()

        # if the camera request is for a Canon EOS 650D then return one

       elif cameraRequest == "Canon EOS 650D": return  CanonDslrList.CanonEos650D()

       # if the camera request is for a Canon EOS Rebel T4i then return one

       elif cameraRequest == "Canon EOS Rebel T4i": return  CanonDslrList.CanonEosRebelT4i()

       # if the camera request is for a Canon EOS Kiss X6i then return one

       elif cameraRequest == "Canon EOS Kiss X6i": return  CanonDslrList.CanonEosKissX6i()

        # if the camera request is for a Canon EOS 600D then return one

       elif cameraRequest == "Canon EOS 600D": return  CanonDslrList.CanonEos600D()

        # if the camera request is for a Canon EOS Rebel T3i then return one

       elif cameraRequest == "Canon EOS Rebel T3i": return  CanonDslrList.CanonEosRebelT3i()

       # if the camera request is for a Canon EOS Kiss X5 then return one

       elif cameraRequest == "Canon EOS Kiss X5": return  CanonDslrList.CanonEosKissX5()

       # if the camera request is for a Canon EOS 1100D then return one

       elif cameraRequest == "Canon EOS 1100D": return  CanonDslrList.CanonEos1100D()

       # if the camera request is for a Canon EOS Rebel T3 then return one

       elif cameraRequest == "Canon EOS Rebel T3": return  CanonDslrList.CanonEosRebelT3()

        # if the camera request is for a Canon EOS Kiss X50 then return one

       elif cameraRequest == "Canon EOS Kiss X50": return  CanonDslrList.CanonEosKissX50()

       else: raise ValueError('There is no Canon DSLR name "%s".' % cameraRequest)


       #this line is for testing

       print "canon level reached"

#else if the DSLR was manufactured by Nikon then see if the factory can create it

    elif mfr == "nikon":

       #go though all of the sup classes of nikon DSLR and find one and return it

       print "nikon level reached"

       raise ValueError('We do not support Nikon Yet')

#else inform the end user about the error

    else:
       raise ValueError('There is no manufacture named "%s".' % mfr)

